package fangzhiyi.business;

/**
 * @author fangzhiyi
 * @version 1.0
 * @date 2025/3/20 15:54
 * @description
 */
public class EmployeeTest{
    public static void main(String[] args) {
        CommonEmp com1 = new CommonEmp("小红","003",4000);
        CommonEmp com2 = new CommonEmp("小明","004",4100);
        CommonEmp com3 = new CommonEmp("小刚","005",4200);
        CommonEmp com4 = new CommonEmp("小桐","006",5400);
        CommonEmp com5 = new CommonEmp("小青","007",3800);

        Manager man1 = new Manager("小白","001",40000,4000);
        Manager man2 = new Manager("小黑","002",42300,2300);

        Employee[] emp ={com1,com2,com3,com4,com5,man1,man2};
        for (Employee employee : emp) {
            double Salary = employee.price();
            System.out.println("姓名:"+employee.name+" 工号:"+employee.id+" 年薪是"+Salary);
        }
    }
}
